package com.qnvip.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author EricLin
 * @Date 2018-06-12 11:51
 */
@RestController
public class HelloConroller {

    @Value("${server.port}")
    String port;

    @GetMapping("/hi")
    public String home() {
        System.out.println("some one here!");
        return "hello world! from " + port;
    }

    @PostMapping("/hi")
    public String say(String msg) {
        return "you say: " + msg;
    }
}
